import request from '@/utils/request'
const api_name = '/eduservice/coursefront'
export default{
    //分页查询课程的方法
    getCourseList(page,limit,searchObj){
        return request({
            url: `${api_name}/list/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    //查询所有分类的方法
    getAllSubject(){
        return request({
            url: `/eduservice/subject/getAllSubject`,
            method: 'get'
        })
    },
    //通过id获取课程相关信息
    getCourseInfo(courseId){
        return request({
            url: `${api_name}/${courseId}`,
            method: 'get'
        })
    }
}